﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Core;
using SaleLibrary.License;
using BrokerBase.Lib.Client;


namespace SaleLibrary.Score
{
    /// <summary>
    /// 积分规则
    /// </summary>
    public class ScoreRule:PKItem,IScoreRule
    {
        public const int INTERNAL_MAX_LEVEL = 32;//内部计算最大层级
        public const double DEFAULT_MIN_AMOUNT = 199D;//默认的最小金额

        private double score;
        private double scale;
        private int maxLevel;
        private double minAmount;

        #region IScoreRule 成员


        public virtual IScorePolicy Policy { get; set; }

        public virtual EditionType Edition { get; set; }

        public virtual double Score 
        {
            get
            {
                return score;
            }
            set
            {
                this.score = value;
                NotifyPropertyChanged("Score");
            }
        }

        public virtual double Scale
        {
            get
            {
                return scale;
            }
            set
            {
                this.scale = value;
                NotifyPropertyChanged("Scale");
            }
        }

        public virtual int MaxLevel
        {
            get
            {
                return maxLevel;
            }
            set
            {
                this.maxLevel = value;
                NotifyPropertyChanged("MaxLevel");
            }
        }

        public virtual double MinAmount
        {
            get
            {
                return minAmount;
            }
            set
            {
                this.minAmount = value;
                NotifyPropertyChanged("MinAmount");
            }
        }

        #endregion

    }
}
